import 'package:flutter/material.dart';

class Item extends StatelessWidget {
  final String title;
  final bool? isActive;
  final Function(BuildContext context)? onTap;

  const Item(
      {super.key, required this.title, this.isActive = false, this.onTap});

  @override
  Widget build(BuildContext context) {
    var color = isActive! ? Colors.green : Colors.black87;
    return GestureDetector(
        onTap: () {
          onTap!(context);
        },
        child: Container(
          child: Row(children: [
            Text(title, style: TextStyle(color: color, fontSize: 16)),
            Icon(
              Icons.arrow_drop_down,
              size: 20,
              color: color,
            )
          ]),
        ));
  }
}
